package com.jzo2o.customer.controller.agency;


import com.jzo2o.customer.model.dto.WorkerCertificationUpdateDTO;
import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditResDTO;
import com.jzo2o.customer.service.AgencyCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 服务端 - 服务认证相关接口
 */
@RestController("agencyAgencyCertificationAuditController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端 - 服务认证相关接口")
public class AgencyCertificationAuditController {

    @Resource
    AgencyCertificationAuditService agencyCertificationAuditService;

    @PostMapping
    @ApiOperation("提交服务认证申请")
    public void SubmitAuthentication(@RequestBody AgencyCertificationAuditResDTO agencyCertificationAuditResDTO) {
        agencyCertificationAuditService.addAuthentication(agencyCertificationAuditResDTO);

    }

    @GetMapping("/rejectReason")
    @ApiOperation("获取拒绝原因")
    public AgencyCertificationAuditResDTO getrejectReason(){
        System.out.println(agencyCertificationAuditService.getReason());
        return agencyCertificationAuditService.getReason();
    }
}